/*
Copyright (C) 2022-2024 Inspur Corp. All Rights Reserved.

SPDX-License-Identifier: Apache-2.0
*/
package gm

import (
	"encoding/hex"

	"github.com/tjfoc/gmsm/sm3"
)

func Sm3(message string) string {
	hash := sm3.New()
	hash.Write([]byte(message))
	bytes := hash.Sum(nil)
	result := hex.EncodeToString(bytes)
	return result
}
